package en.edu.zxj.logisticsservice.Listener;

import en.edu.zxj.orderservice.constant.Constants;
import en.edu.zxj.orderservice.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2024-09-20
 * @time: 16:24:38
 */
@Component
@RabbitListener(queues = Constants.WORK_QUEUE_NAME)
public class OrderCreateListener {
    @RabbitHandler
    public void createOrder(String msg) {
        System.out.println("接收到订单消息 String：" + msg);
    }

    @RabbitHandler
    public void createOrder(OrderInfo orderInfo) {
        System.out.println("接收到订单消息 OrderInfo：" + orderInfo);
    }

}
